package zjt.demo3;

public class Maopao {
    public static void main(String[] args) {
        int[] a = {12,44,23,11,5};
        for(int i=0;i< a.length;i++){
            for(int j=1;j<a.length-i;j++){
                if(a[j-1]>a[j]) {
                    int t = a[j-1];
                    a[j-1] = a[j];
                    a[j] = t;
                }
            }
        }
        for(int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }
    }
}
